package bancosys.tec.persist.hibernate.impl;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;

import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.CascadeType;
import org.hibernate.annotations.Type;

import bancosys.tec.utils.date.Date;

@Entity
public class Dono {

    @Id
    @GeneratedValue
    long id;

    @OneToMany
    @Cascade({ CascadeType.ALL })
    @JoinColumn(name = "COL_ID_FILHO_DONO")
    List<Filho> filhos = new ArrayList<Filho>();

    @Type(type = "bancosys.tec.persist.hibernate.type.DateType")
    Date data1;

}
